// 基于storage的操作
let storageType = window.localStorage

const storage = {
    get: (key) => {
        return storageType.getItem(key) || ''
    },
    set: (key, value) => {
        storageType.setItem(key, value)
        return 1
    },
    del: (key) => {
        storageType.removeItem(key)
        return 1
    },
    //清空storage
    clear: () => {
        storageType.clear()
    }
}

export default storage